/**
 * <p>
 *
 * @Author：Roy
 * @Description：计量设备管理
 * @Date：Create by 2023-11-30 18:51:39
 */
import request from '@/utils/request'

const meterDevice = {
  // 分页查询计量设备管理
  queryList(data) {
    return request({
      url: '/energy-carbon/ecp-admin/meterDevice/queryPage',
      method: 'post',
      data
    })
  },
  // 计量设备详情
  detail(data) {
    return request({
      url: '/energy-carbon/ecp-admin/meterDevice/detail',
      method: 'post',
      data
    })
  },// 计量设备详情
  detailByCode(deviceCode) {
    return request({
      url: '/energy-carbon/ecp-admin/meterDevice/detailByCode',
      method: 'get',
      params: { deviceCode }
    })
  },
  // 新增计量设备管理
  add(data) {
    return request({
      url: '/energy-carbon/ecp-admin/meterDevice/add',
      method: 'post',
      data
    })
  },

  deviceModel(deviceId) {
    return request({
      url: '/energy-carbon/ecp-admin/meterDevice/deviceModel',
      method: 'post',
      params: { deviceId }
    })
  },
  // 编辑计量设备管理
  update(data) {
    return request({
      url: '/energy-carbon/ecp-admin/meterDevice/update',
      method: 'post',
      data
    })
  },
  // 删除计量设备管理
  deleteById(data) {
    return request({
      url: '/energy-carbon/ecp-admin/meterDevice/deleteById',
      method: 'post',
      data
    })
  },
  // 启用禁用
  enableOrDisable(data) {
    return request({
      url: '/energy-carbon/ecp-admin/meterDevice/enableOrDisable',
      method: 'post',
      data
    })
  },
  // 批量删除计量设备管理
  batchDelete(data) {
    return request({
      url: '/energy-carbon/ecp-admin/meterDevice/batchDelete',
      method: 'post',
      data
    })
  },
  // 计量设备查询能源类型关联了碳排因子的计量设备
  queryMeterDeviceWithEmissionFactor(data) {
    return request({
      url: '/energy-carbon/ecp-admin/meterDevice/queryMeterDeviceWithEmissionFactor',
      method: 'post',
      data
    })
  },
  // 计量设备查询能源类型关联了减排因子的计量设备
  queryMeterDeviceWithEmissionReductionFactor(data) {
    return request({
      url: '/energy-carbon/ecp-admin/meterDevice/queryMeterDeviceWithEmissionReductionFactor',
      method: 'post',
      data
    })
  }
}

export default meterDevice
